package com.canlihao.ui.base;

import android.view.View;
import android.widget.TextView;

import androidx.core.content.ContextCompat;

import com.canlihao.ui.R;
import com.canlihao.ui.utils.Tools;
import com.qmuiteam.qmui.util.QMUIStatusBarHelper;
import com.qmuiteam.qmui.widget.QMUITopBarLayout;

public abstract class BaseWhiteTopbarActivity extends BaseActivityNormal {

    protected QMUITopBarLayout mTopBar;
    @Override
    protected void initView() {
        mTopBar = findViewById(R.id.topbar);
        QMUIStatusBarHelper.setStatusBarLightMode(this);
        mTopBar.setBackgroundColor(ContextCompat.getColor(this, R.color.person_real_title));
        //mTopBar.setBackgroundDividerEnabled(true);
        mTopBar.addLeftImageButton(R.drawable.ic_chevron_left_black_24dp, R.id.qmui_topbar_left_drawable_id).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    protected void setBackgroundColor(int color){
        mTopBar.setBackgroundColor(ContextCompat.getColor(this,color));
    }


}